#include "inc/os.h"
#include "inc/syscall.h"

uint32_t sys_get_mstatus()
{
	uart_puts("--> sys_get_mstatus\n");
	return r_mstatus();
}

void do_syscall(context *cxt)
{
	uint32_t syscall_num = cxt->a7;

	switch (syscall_num) {
		case SYS_GET_MSTATUS:
		       	cxt->a0 = sys_get_mstatus();
		       	break;
		default:
			printf("Unknown syscall no: %d\n", syscall_num);
                	cxt->a0 = -1;
	}
}
